Skip to content

elvish: improve OSC 133 semantic prompt support - #11222

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
jparise:elvish-prompts
Mar 8, 2026
Merged

elvish: improve OSC 133 semantic prompt support#11222
mitchellh merged 1 commit into
ghostty-org:mainfrom
jparise:elvish-prompts

Conversation

@jparise

@jparise jparise commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Add aid=$pid to 133;A and 133;D for nested shell tracking, and fix the state comparison which was incorrectly using constantly (comparing a string to a function, which always evaluated to true).

OSC 133;B (input start) and 133;P;k=r (right prompt) cannot be reliably implemented at the script level because Elvish escapes control characters in prompt function output, and writing directly to /dev/tty has timing issues because Elvish renders its prompts on a background thread. Full semantic prompt support requires a native implementation: elves/elvish#1917

See: #10523

Add `aid=$pid` to 133;A and 133;D for nested shell tracking, and fix the
state comparison which was incorrectly using `constantly` (comparing a
string to a function, which always evaluated to true).

OSC 133;B (input start) and 133;P;k=r (right prompt) cannot be reliably
implemented at the script level because Elvish escapes control
characters in prompt function output, and writing directly to /dev/tty
has timing issues because Elvish renders its prompts on a background
thread. Full semantic prompt support requires a native implementation:
elves/elvish#1917

See: ghostty-org#10523
@jparise
jparise requested a review from a team as a code owner March 8, 2026 01:34
@mitchellh
mitchellh merged commit 1d76820 into ghostty-org:main Mar 8, 2026
64 checks passed
@github-actions github-actions Bot added this to the 1.3.0 milestone Mar 8, 2026
@jparise
jparise deleted the elvish-prompts branch March 8, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants